
<html>
<head>
<meta charset="UTF-8">
<title>表模型代码</title>
	<link id="easyuiTheme"  href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
	<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
	<script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
	<script src="../../ffres/dict/all.js" type="text/javascript"></script>
<!--	<script src="../../alldic.js"></script>-->
	<a href="" target="_blank" id="commonLink" name="commonLink"></a>
<script type="text/javascript">

	$(function() {
		queryList();
	});
	function queryList(){
		var projectId = $.getUrlParam("appId");
		$('#dg').datagrid({
			queryParams: {
				projectId: projectId
			}
		});
		$('#dg').datagrid({url : '../../api/model/table/infos'})
	}

</script>
</head>
<body class="easyui-layout">
<div class="easyui-layout" title="" style="width:100%;height:100%;padding:0px;">
	<div data-options="region:'center',split:false" title="" style="width:25%;">
		<table id="dg" class="easyui-datagrid" toolbar="#tb"
			style="width: 100%; height: 100%"
			data-options="singleSelect:true,collapsible:true,method:'post'"
			title="Load Data" rownumbers="true" pagination="true"
			pageSize="20">
			<thead>
				<tr>
					<th data-options="field:'objectId'" hidden>对象标识</th>
					<th data-options="field:'tableModelId'" hidden>表模型ID</th>
					<th data-options="field:'objectCode'" width="49%">表模型代码</th>
					<th data-options="field:'objectName'" width="50%">表模型名称</th>
				</tr>
			</thead>
		</table>
	</div>
	<div data-options="region:'south',split:false" style="height:30px;text-align:center;padding:0px">
		    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="doSelect()">选择返回</a>&nbsp;
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
	    	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</div>
</div>
<div id="tb" style="padding:1px">
	<div style="margin-bottom:2px">
	<form id="searchForm">
		<table>
			<tr>
				<td>&nbsp;表模型代码：</td>
				<td><input name="objectCode" /></td>
				<td>&nbsp;表模型名称：</td>
				<td><input name="objectName" /></td>
				<td><a class="easyui-linkbutton" href="javascript:void(0);" id='btnQuery' onclick="JLEUtil.queryForm('searchForm','dg','../../api/model/table/infos');">查找</a></td>
				<td><a class="easyui-linkbutton" href="javascript:void(0);" id='btnClear' onclick="JLEUtil.clearForm('searchForm');">清空</a></td>
			</tr>
		</table>
	</form>
	</div>
</div>

	<script>
		function doSelect(){
			var row = $('#dg').datagrid('getSelected');
			if (row) {
				debugger
				window.parent.setModelCodeValue(row);
				window.parent.JLEUtil.closewin();
			} else {
				$.messager.alert('提示', '请选择一条记录！');
			}
		}		
		function closeForm(){
			window.parent.JLEUtil.closewin();
		}
	</script>
</body>
</html>
